source PAC.tcl

# MapP --
#

inherit MapP Presentation
method MapP constructor {control mapCanvas} {
	this inherited $control
	set this(mapView) $mapCanvas 
	
}

method MapP createPlanete {D_planet} {
	dict for {x y radius} $D_palnet {
		$this(mapView) create oval [expr $x - $radius] [$y - $radius] [$x + $radius] [$y + $radius] 
	}
}

method MapP createVaisseau {D_vaisseau} {
	set vaisseau_radius 3
	dict for {x y color} $D_vaisseau {
		$this(mapView) create oval [expr $x - $vaisseau_radius] [$y - $vaisseau_radius] [$x + $vaisseau_radius] [$y + $vaisseau_radius] -fill color 
	}
}

method MapP destructor {} {
   this inherited
}


# Map --
#

inherit Map Control
method Map constructor {mapCanvas} {
   MapP ${objName}_pres $objName $mapCanvas
   this inherited "" "" ${objName}_pres
}

method Map destructor {} {
   this inherited
}

method Map createPlanete {D_planet} {
	$this(presentation) createPlanete $D_planet
}
method Map createVaisseau {D_vaisseau} {
	$this(presentation) createVaisseau $D_vaisseau
}
